global class scheduledRequestCourierPickup implements Schedulable {
    global void execute(SchedulableContext sc) {
    
        List<Request__c> serviceLetterObject= new List<Request__c>([Select Id, shipment_Number__c , Shipment_Status__c , Last_Courier_Update__c from Request__c where Request_Status__c= 'Scheduled for Delivery' ]);
        Map<string,Id> serviceLetterShipmentMap = new Map<string,Id>();
        
        String param = '' ;
        String AramexResponse ='';
        if (serviceLetterObject.size()>0){
              for(Aramex_Integration__c item : Aramex_Integration__c.getAll().values()){
                    param += item.AccountCountryCode__c + '|' ;
                    param += item.AccountEntity__c + '|' ;
                    param += item.AccountNumber__c + '|' ;
                    param += item.AccountPin__c + '|' ;
                    param += item.UserName__c + '|' ;
                    param += item.Password__c + '|' ;
                    param += item.Version__c ;
              }
              for(Request__c serviceObject : serviceLetterObject)
              {
                     param += '||'+serviceObject.Shipment_Number__c;
                     serviceLetterShipmentMap.put(serviceObject.Shipment_Number__c,serviceObject.Id);
              }
              
            if (String.isNotBlank(param)){
                    Aramex_Smartpaperbpm.WebParam = param ; 
                    Aramex_Smartpaperbpm.CheckAramexShipment();
                    AramexResponse = Aramex_Smartpaperbpm.stdemo;
                }
        }
        
    }
}